
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>TCP、HTTP、FTP分别属于OSI模型的哪一层？ - 学习卡片</title>
      <style>
        body { font-family: sans-serif; background-color: #f0f8ff; color: #333; display: flex; flex-direction: column; align-items: center; padding: 50px 20px; }
        .header h1 { font-size: 32px; }
        .grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; width: 100%; max-width: 1200px; }
        .card-container { perspective: 1200px; cursor: pointer; height: 250px; }
        .card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.7s; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
        .card-container.flipped .card { transform: rotateY(180deg); }
        .card-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; box-sizing: border-box; border-radius: 16px; background-color: #fff; padding: 24px; }
        .card-back { background-color: #f0fff4; transform: rotateY(180deg); justify-content: space-between; }
        .card-category { font-size: 14px; color: #0052d9; margin-bottom: 8px; font-weight: 500; }
        .card-question { font-size: 20px; font-weight: 500; flex-grow: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
        .card-answer-wrapper { flex-grow: 1; overflow-y: auto; }
        .card-answer { font-size: 15px; line-height: 1.7; }
        .card-footer { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 16px; margin-top: 16px; }
        .card-source { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 12px; margin-top: 12px; }
      </style>
    </head>
    <body>
      <div class="header">
        <h1>TCP、HTTP、FTP分别属于OSI模型的哪一层？ - 学习卡片</h1>
      </div>
      <div class="grid-container">
        
    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">理论</div>
          <div class="card-question">在OSI模型中，TCP协议位于哪一层？其主要职责是什么？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">理论</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">TCP位于OSI模型的第四层——传输层。其主要职责是为端到端的数据传输提供可靠的通信服务，确保数据包能够从发送方正确传送到接收方。</div>
          </div>
          <div class="card-source">来源: 1. TCP（传输控制协议）——传输层（Transport Layer）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">为了保证数据传输的可靠性，TCP协议提供了哪些具体的控制和检测功能？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">TCP提供了流量控制（Flow Control）、拥塞控制（Congestion Control）和错误检测（Error Detection）等功能。这些机制确保了即使在网络不稳定的情况下，也能保证数据的完整性和顺序性。</div>
          </div>
          <div class="card-source">来源: 1. TCP（传输控制协议）——传输层（Transport Layer）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">特性</div>
          <div class="card-question">文档中提到的HTTP协议的“无状态”（Stateless）特性指的是什么？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">特性</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">HTTP的“无状态”特性意味着每一次请求都是独立的，协议本身不会记住客户端之前的请求状态。</div>
          </div>
          <div class="card-source">来源: 2. HTTP（超文本传输协议）——应用层（Application Layer）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">理论</div>
          <div class="card-question">HTTP和FTP协议在OSI模型中位于同一层，请问是哪一层？这一层的主要作用是什么？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">理论</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">HTTP和FTP都位于OSI模型的第七层——应用层。应用层负责直接为用户提供网络服务和应用程序功能。</div>
          </div>
          <div class="card-source">来源: 2. HTTP（超文本传输协议）——应用层（Application Layer） 和 3. FTP（文件传输协议）——应用层（Application Layer）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">FTP协议的主要用途是什么？它如何保证文件访问的安全性？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">FTP是一种用于在客户端和服务器之间进行双向文件传输（上传和下载）的标准协议。它通过支持用户身份验证（用户名和密码）来控制对文件的访问权限，从而保证安全性。</div>
          </div>
          <div class="card-source">来源: 3. FTP（文件传输协议）——应用层（Application Layer）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">像FTP这样的应用层协议，是如何实现可靠数据传输的？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">应用层协议（如FTP）本身不直接负责数据传输的可靠性，它依赖于传输层协议（通常是TCP）来为其提供可靠的数据传输服务。</div>
          </div>
          <div class="card-source">来源: 3. FTP（文件传输协议）——应用层（Application Layer）</div>
        </div>
      </div>
    </div>

      </div>
    </body>
    </html>
